package org.databasefacade.select.functions.aggregate;

import org.databasefacade.select.Arithmetic;
import org.databasefacade.select.functions.AbstractFunction;
import org.databasefacade.select.functions.Function;
import org.databasefacade.table.column.Column;

public class Max extends AbstractFunction implements Function {
	
	public Max(Column col) {
		this.functionType=Function.MAX;
		this.isAggregate = true;
		String field = col.getTableAlias() + '.' + col.getColumnName();
		this.parameters.add(field);
	}
	
	public Max(Arithmetic calc) {
		this.functionType=Function.MAX;
		this.isAggregate = true;
		this.parameters.add(calc.getSQL());
	}
}
